Repository navigation
fix(plugin-form): pin the master-detail Save bar and guard the subform close - #34657
Merged
objectstack-fleet[bot] merged 4 commits intoNov 17, 2026
Merged
Conversation
…m close MasterDetailForm's action bar sticks to the bottom of the hosting scroll frame (dialog body, drawer, record page). The master-detail form reports its unsaved input (header, lines, row editor) through a package-internal context into the ModalForm/DrawerForm close guard, and the ModalForm subform arm routes its close paths through the discard dialog. Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs Co-authored-by: Claude <noreply@anthropic.com>
…rm close guard Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs Co-authored-by: Claude <noreply@anthropic.com>
…ted input Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs Co-authored-by: Claude <noreply@anthropic.com>
…bform-sticky-footer
Contributor
Author
|
repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs Final green head for L1 · 2026-11-17T05:24Z
|
Contributor
Author
|
repo:objectstack#3 · os-support-ai · session_01WGufzhshTXCAmv9KJXRZkB 席位核对 · L1 (seat 3, L1-a) · 2026-11-17T05:26ZL1: ACCEPT Must-fixNone. Should-fixNone. Readings that hold
Notes
|
Contributor
Author
|
repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs Landing · area o3-B · 2026-11-17T05:27Z
State change: ready for review + auto-merge (merge queue). Card #34599 closes on merge via |
objectstack-fleet
Bot
deleted the
claude/issue-34599-subform-sticky-footer
branch
November 17, 2026 05:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Yibo Wang · project thread
Fixes #34599
Clause-②: no
Metadata-protocol: none
repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs
维护者速读
@object-ui/plugin-form),保存逻辑(/api/v1/batch)、按钮 test id、包的导出都没动;有问题直接回退本 PR 即可。MasterDetailForm.tsx(操作栏的 sticky 类与未保存判定)、ModalForm.tsx(子表分支的关闭路径改走确认框)、formDirtyReport.ts(包内的未保存信号通道)。What changes
MasterDetailForm's action bar (md-form-cancel/md-form-submit, test ids unchanged) is nowposition: sticky; bottom: 0with an opaque background, a direct child of the form's root. Sticky resolves against the nearest scrolling ancestor, so the same bar pins to the dialog body scroller (ModalForm), the drawer content (DrawerForm) and the record page's scroller (ObjectFormpage host,RecordFormPage). Measured in Chromium: sticky stops at the scroller's CONTENT edge, so a padded scroller would show lines scrolling through the padding strip under the bar; anafter:strip (24px, the widest host padding) paints over it. ADR-0035 Decision §6 stays true: the form owns its Save, and no host draws a second footer.FormDirtyReportContext(formDirtyReport.ts, not re-exported from the index), carries an unsaved-input verdict up to the nearest provider:ModalFormandDrawerFormprovide their close guard's setter around the master-detail form they host;MasterDetailFormreports header OR lines OR row editor, and provides its own reporters around the header form and the row editor;ObjectForm's default arm,TabbedForm) report the renderer's existingonDirtyChangeverdict to it, beside their bus gate.linesUnsaved, already the bus-hold rule): a blank ghost line is not input, a reverted edit reads as saved. A save clears the verdict (create remounts the header; an edit resets the header verdict and advances the lines' baseline).ModalForm's subform arm now routes its Dialog close (X, Escape, backdrop) through the sameattemptClosepath and discard AlertDialog as the flat arm, and its beforeunload guard hears the same verdict.DrawerFormalready routed its Sheet close through the guard; it now hears the master-detail input. The explicit Cancel still closes at once, as in the flat arm.submitHandler(one batch), which never reachesuseOccSave; there is no OCC token to conflict on, so none was invented.MasterDetailFormProps,MasterDetailFormSchemaandsrc/index.tsxare byte-identical (git diffof index.tsx is empty, noexport/interfaceline moved), which is what keepsClause-②: no.Tests
subformHosts.test.tsx, new top-level describe "master-detail Save bar is pinned to the host scroll frame": in modal, drawer and page hosts the bar is sticky + bottom-0 + opaque, and the first ancestor that sets an overflow is the host's own scroller (modal: theflex-1 overflow-y-autobody; drawer: the Sheet content; page: none inside the component). One Save in the dialog, nomodal-form-footer/drawer-form-footer.discardGuard.test.tsx, new top-level describe "master-detail overlay unsaved-changes guard": pristine dialog closes on the X; typed header input prompts and "Discard" closes; an edited line alone prompts; Cancel closes a dirty dialog at once; dirty dialog blocks unload; drawer prompts on typed header input; the reporter goes true then false across a create save and across an edit save (header stays mounted).Readings (head c367f82 unless noted)
pnpm --filter @object-ui/plugin-form exec vitest run --root ../.. --maxWorkers=2 packages/plugin-form/under the verify lock:Test Files 233 passed (233),Tests 2604 passed | 1 skipped (2605), VERDICT command-exit 0.Test Files 233 passed (233),Tests 2604 passed | 1 skipped (2605), VERDICT command-exit 0; type-check and the changeset / nul-byte / type-check-coverage gates exit 0.pnpm --filter @object-ui/plugin-form run type-check(bothtsc --noEmitandtsc -p tsconfig.test.json): VERDICT command-exit 0.scripts/ablation-replace.mjs, mutation proven on disk, restored to the HEAD blob withgit diff HEADempty; tests import./ModalFormetc. from source, so no dist leg):sticky bottom-0from the bar: 3 failed (the three host pins).linesDirtyfrom the verdict: 1 failed (edited line alone).handleSaved: first run stayed green (a create remounts the header, so the reset is redundant there); the edit-save pin was added, and the re-run failed 1 (that pin).onOpenChange={schema.onOpenChange}: 2 failed (header and line prompts).after:strip the padding strip renders covered and the scroll height is unchanged (1088 = content + bar + padding).Acceptance notes
md-form-submitspecs (acceptance 4) on this PR.RecordFormPage) has no close guard for the flat form either, so none was added for the master-detail page host.md-form-actionsis a new test id on the bar wrapper (for the pins);md-form-cancel/md-form-submitare unchanged.after:strip extends 24px below the bar in its resting position; in every host measured the master-detail form is the last child of its scroller, where that strip covers only the scroller's bottom padding.Verification
dispatch-gates.mjs --commandslist for this diff (38 commands) pluspnpm check:changeset-fixed(its roster sits under.changeset/), every one exit 0;pnpm --dir ui run check:new-line-citations: 0 new citations. CI owns the rest (Lint UI, Type Check UI, Test UI, Build & E2E UI, Live E2E UI, Dogfood).Generated by Claude Code